# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=psqlodbc
pkgver=13.01.0000
pkgrel=0
pkgdesc="PostgreSQL ODBC driver"
url="https://www.postgresql.org"
arch="all"
license="GPL-2.0-or-later"
makedepends="libpq-dev unixodbc-dev libtool"
source="https://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-$pkgver.tar.gz"

builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}
sha512sums="
34f9e64d2fe45b90f08fdec3afa9f841cfda2d3d92b2755942aa24f2dde6f909601c0aa0b5d4dc03318708effe195f634058cf252536180f514ea9f3b18536e4  psqlodbc-13.01.0000.tar.gz
"
